package com.zfei.gfb.query;

import com.zfei.gfb.bean.Const;
import com.zfei.gfb.bean.Page;
import com.zfei.gfb.bean.Status;
import com.zfei.gfb.bean.StatusException;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author fgh
 */
public class GfbJobQuery extends Page {

	// 操作人uid
	@ApiModelProperty(hidden = true)
	private Integer userId;
	// 岗位名称
	@ApiModelProperty("岗位名称")
	private String name;
	// 发布者名称
	@ApiModelProperty("发布者名称")
	private String userName;
	// 类型 2:企业, 3: 镇村
	@ApiModelProperty("类型,2:企业, 3: 镇村")
	private Integer type;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setUserId(Integer value) {
		this.userId = value;
	}

	public Integer getUserId() {
		return this.userId;
	}

	public void setName(String value) {
		this.name = value;
	}

	public String getName() {
		return this.name;
	}

	public void setType(Integer value) {
		this.type = value;
	}

	public Integer getType() {
		return this.type;
	}

	public Page check() {
		if(type != null && type != Const.JOB_COM && type != Const.JOB_GOV){
			throw new StatusException(Status.INVALID_ARGUMENT);
		}
		return this;
	}

}

